
#define _CRT_SECURE_NO_WARNINGS  1
#include <stdio.h>
int main()
{
	
	int n = 0;
	int j = 0;
	double sum1 = 0.0;
	double sum2 = 0.0;
	double sum = 0.0;
	for (n = 1; n <=100; n += 2)
	{
		sum1 += 1.0/n ;
	}
	printf("sum1=%lf\n", sum1);
	for (j = 2; j <=100; j +=2)
	{
		sum2 += 1.0 / j ;
	}
	printf("sum2=%lf\n", sum2);
	sum = sum1 - sum2;
	printf("sum=%lf\n", sum);
	return 0;
}